From f2896ff4cd784b2235891ab3bfbb3c0573aaf7fc Mon Sep 17 00:00:00 2001 From: "smh22@firebug.cl.cam.ac.uk" Date: Fri, 18 Nov 2005 19:56:03 +0100 Subject: [PATCH] Only resume xenbus /after/ we've prepared our VCPUs; otherwise the VCPU hotplug callback can race with our vcpu_prepare. Signed-off-by: Steven Hand --- linux-2.6-xen-sparse/arch/xen/kernel/reboot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c index b403d1e004..c77cd2eadf 100644 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c @@ -182,12 +182,20 @@ static int __do_suspend(void *ignore) xencons_resume(); - xenbus_resume(); - #ifdef CONFIG_SMP for_each_cpu(i) vcpu_prepare(i); +#endif + + /* + ** Only resume xenbus /after/ we've prepared our VCPUs; otherwise + ** the VCPU hotplug callback can race with our vcpu_prepare + */ + xenbus_resume(); + + +#ifdef CONFIG_SMP out_reenable_cpus: for_each_cpu_mask(i, prev_online_cpus) { j = cpu_up(i); -- 2.30.2